<?php
/**
 * ClassName: TreatmentCateModel
 * Description:
 * @Author 周昌
 * @Create 2023/11/17 16:18
 */

namespace model;


class TreatmentCateModel extends BaseModel
{
    protected $name='treatment_cate';

    //时间获取器
    public function getAddTimeAttr($value){
        if(!empty($value)&& is_integer($value)){
            return date('Y-m-d H:i:s', $value);
        }else{
            return $value;
        }

    }
    // 治疗项分类 对 治疗项 一对多
    public function treatment(){
        return $this->hasMany('TreatmentModel','treatment_cate_id','id');
    }
}